package test33;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2023-04-26
 * Time: 22:38
 */
import java.io.*;
//https://www.nowcoder.com/questionTerminal/1046cd038f7a4b04b2b77b415973de1c
// KMP 怎么写？
public class Main1 {
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

    public static void main(String[] args) throws IOException {
        String str = null;
        while ((str = br.readLine()) != null) {
            String[] strs = str.split(" ");
            String source = strs[0];
            String match = strs[1];
            int count = 0;
            for (int i = 0; i < source.length(); i++) {
                int temp = i;
                boolean flag = true;
                for (int j = 0; j < match.length(); j++) {
                    if (temp < source.length() && source.charAt(temp) == match.charAt(j)) {
                        temp++;
                    } else {
                        flag = false;
                        break;
                    }
                }
                if (flag) {
                    count++;
                    source = source.substring(0, i) + source.substring(temp, source.length());
                    i = -1;
                }
            }
            bw.write(count + "\n");
        }
        bw.flush();
        bw.close();
        br.close();
    }
}